/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2a6c, #2c3e50);
    color: #f0f0f0;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    background: linear-gradient(135deg, #3498db, #1abc9c);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.logo-text h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 1px;
}

.logo-text p {
    color: #95a5a6;
    font-size: 14px;
}

.status {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e74c3c;
}

.connected .status-indicator {
    background: #2ecc71;
}

.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.stat-card {
    text-align: center;
}

.stat-card h2 {
    font-size: 14px;
    text-transform: uppercase;
    color: #95a5a6;
    margin-bottom: 10px;
}

.stat-card .value {
    font-size: 36px;
    font-weight: 700;
    color: #3498db;
}

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.filter {
    flex: 1;
}

.filter label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #bdc3c7;
}

.filter select, .filter input {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 14px;
}

.logs-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.logs-header {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.4);
    display: grid;
    grid-template-columns: 1.5fr 1fr 2fr 1fr 1fr 1.5fr;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logs-list {
    max-height: 500px;
    overflow-y: auto;
}

.log-entry {
    display: grid;
    grid-template-columns: 1.5fr 1fr 2fr 1fr 1fr 1.5fr;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s;
    font-size: 14px;
}

.log-entry:nth-child(odd) {
    background: rgba(255, 255, 255, 0.02);
}

.log-entry:hover {
    background: rgba(255, 255, 255, 0.08);
}

.ip-address {
    color: #3498db;
    font-weight: 600;
}

.method {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    display: inline-block;
}

.method-GET {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.method-POST {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.method-PUT {
    background: rgba(155, 89, 182, 0.2);
    color: #9b59b6;
}

.method-DELETE {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.result {
    font-weight: 600;
}

.result-200 {
    color: #2ecc71;
}

.result-404 {
    color: #f39c12;
}

.result-500 {
    color: #e74c3c;
}

.result-blocked {
    color: #e74c3c !important;
    font-weight: bold;
}

.port {
    color: #9b59b6;
}

.timestamp {
    color: #95a5a6;
    font-size: 13px;
}

.no-logs {
    text-align: center;
    padding: 40px;
    color: #95a5a6;
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 14px;
}

.search-bar button {
    background: #3498db;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: #2980b9;
}

/* 拦截请求特殊样式 */
.blocked-entry {
    border-left: 4px solid #e74c3c;
    background: rgba(231, 76, 60, 0.1) !important;
    animation: pulse 1s;
}

.blocked-entry:hover {
    background: rgba(231, 76, 60, 0.15) !important;
}

@keyframes pulse {
    0% { background: rgba(231, 76, 60, 0.3); }
    100% { background: rgba(231, 76, 60, 0.1); }
}

/* 响应式设计 */
@media (max-width: 900px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .logs-header, .log-entry {
        grid-template-columns: 1fr 1fr;
    }
    
    .log-entry > div:nth-child(3),
    .log-entry > div:nth-child(4),
    .log-entry > div:nth-child(5),
    .log-entry > div:nth-child(6) {
        grid-column: span 1;
    }
}
/* 防火墙配置样式 */
.firewall-config {
    margin-bottom: 30px;
    padding: 20px;
}

.config-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.input-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.input-group label {
    width: 200px;
    margin-right: 10px;
    text-align: right;
}

.input-group input {
    flex: 1;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: white;
}

#update-firewall {
    display: block;
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 20px;
}

#update-firewall:hover {
    background: #2980b9;
}